import { Input } from 'antd';
import {useState, useEffect} from 'react';
import {Route,useHistory} from 'react-router-dom';
import axios from '_axios@0.21.1@axios';
import './SearchMenu.css';

const { Search } = Input;

const SearchMenu = (props) => {

  const history = useHistory();
  const [queryParams,setQueryParams] = useState({});

  const onSearch = (value) => {
    setQueryParams({
      nameOfSong:value,
    });
    console.log(value)
    history.push({pathname:'/app/menu1/result',state:{param:value}})
  }

  return (<><div className='search'>
    <Search placeholder="input search text" onSearch={onSearch} enterButton />
  </div>

  </>)

}

export default SearchMenu;